/**
 * @description 敏感词监控
 * @time 2024-05-09
 * **/

import request from '@/utils/request'

// 查询敏感词列表
export function getSensitiveWordList(data) {
  return request({
    url: '/admin/risk/sensitiveWord/list?pageNum=' + data.pageNum + '&pageSize=' + data.pageSize,
    method: 'post',
    data
  })
}

// 获取敏感词详情信息
export function querySensitiveWord(params) {
  return request({
    url: '/admin/risk/sensitiveWord/query',
    method: 'get',
    params
  })
}

// 新增敏感词
export function addSensitiveWord (data) {
  return request({
    url: '/admin/risk/sensitiveWord/addWord',
    method: 'post',
    data
  })
}

// 修改敏感词
export function editSensitiveWord (data) {
  return request({
    url: '/admin/risk/sensitiveWord/editWord',
    method: 'post',
    data
  })
}

// 删除敏感词
export function delSensitiveWord(params) {
  return request({
    url: '/admin/risk/sensitiveWord/delete',
    method: 'get',
    params
  })
}

// 删除敏感词管理前查询敏感词是否有触发记录
export function beforeDel(params) {
  return request({
    url: '/admin/risk/sensitiveWord/check',
    method: 'get',
    params
  })
}

// 获取敏感词数量和员工数量
export function getWordCount(params) {
  return request({
    url: '/admin/risk/sensitiveWord/wordCount',
    method: 'get',
    params
  })
}

// 获取敏感词触发记录列表
export function getTriggerRecordList(data) {
  return request({
    url: '/admin/risk/sensitiveWord/triggerRecord?pageNum=' + data.pageNum + '&pageSize=' + data.pageSize,
    method: 'post',
    data
  })
}

// 获取敏感词触发员工列表
export function getTriggerUserList(params) {
  return request({
    url: '/admin/risk/sensitiveWord/triggerUser',
    method: 'get',
    params
  })
}

// 触发记录处理
export function handleDispose(data){
  return request({
    url: '/admin/risk/sensitiveWord/handle',
    method: 'post',
    data
  })
}
